//
// Centers an element on the page.
//
function ddd_center(element_id) {
  var element = $("#" + element_id);

  element.css("position","absolute");
  element.css("top", ( $(window).height() - element.height() ) / 
                    2 + $(window).scrollTop() + "px");
  element.css("left", ( $(window).width() - element.width() ) / 
                    2 + $(window).scrollLeft() + "px");

  return element;
}
